/**
 * @author 
 * @time 
 * @description 封装采购页请求接口
 */
import { PURCHASE_DELETE_URL, PURCHASE_SAVE_URL, METERIAL_LIST_URL, PROJECT_LIST_URL, PURCHASE_FLOW_URL, PURCHASE_LIST_URL, SUPPLIER_LIST_URL, USER_LIST_URL } from '../config/url.config'
import Ajax from './Ajax'

export function purchaseListApi(params) {
    return Ajax({
        url: PURCHASE_LIST_URL,
        method: 'get',
        params
    })
}

export function purchaseFlowApi(data) {
    return Ajax({
        url: PURCHASE_FLOW_URL,
        data
    })
}

export function projectListApi(params) {
    return Ajax({
        url: PROJECT_LIST_URL,
        method: 'get',
        params
    })
}

export function meterialListApi() {
    return Ajax({
        url: METERIAL_LIST_URL,
        method: 'get'
    })
}

export function supplierListApi(params) {
    return Ajax({
        url: SUPPLIER_LIST_URL,
        method: 'get',
        params
    })
}

export function userListApi(params) {
    return Ajax({
        url: USER_LIST_URL,
        method: 'get',
        params
    })
}

export function purchaseSaveApi(data) {
    return Ajax({
        url: PURCHASE_SAVE_URL,
        data

    })
}

export function purchaseDeleteApi(id) {
    return Ajax({
        url: PURCHASE_DELETE_URL+id,
        id
    })

}